-
Notifications
You must be signed in to change notification settings - Fork 223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add SendEventWithContext method #824
Conversation
this will let us pass a context.Context when creating a new request with getRequestFromEvent.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #824 +/- ##
==========================================
- Coverage 81.74% 81.73% -0.02%
==========================================
Files 50 50
Lines 4427 4434 +7
==========================================
+ Hits 3619 3624 +5
- Misses 659 660 +1
- Partials 149 150 +1 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a bit more about the why?
This will let us pass a context.Context when creating a new request with getRequestFromEvent.
This will let us have a more granular control over how/when we cancel a request instead of relying only on the client timeout.
For example, if such API is invoked while serving another HTTP request, we might want to take advantage of such request context to bail out earlier than the client timeout if necessary.
As per documentation: